import { defineStore } from 'pinia'
import { ref } from 'vue'

export const allCompanyStore = defineStore(
    'allCompany',
    () => {
        const allCompany = ref('')
        const allJobs =ref('')
        const setAllCompany = (newAllCompany) => {
            allCompany.value = newAllCompany
        }
        const setAllJobs = (newAllJobs) => {
            allJobs.value = newAllJobs
        }
        const removeAllCompany = () => {
            allCompany.value = ''
        }
        const removeAllJobs = () => {
            allJobs.value = ''
        }
        return {
            allCompany,
            setAllCompany,
            removeAllCompany,
            allJobs,
            setAllJobs,
            removeAllJobs
        }
    },
    {
        persist: true
    }
)
